home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_name != "enemy")
- {
- if(330 < _Y)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- }
- if(_Y < -100)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- }
- setProperty("_root.es" + this._name, _X, _X / 8 + 248);
- setProperty("_root.es" + this._name, _Y, _Y / 8 + 18);
- if(this.hitTest(_root.ship) && _root.shippause == 0 && _root.shield == 0)
- {
- _root.ship._alpha = 0;
- _root.explosioncount = _root.explosioncount + 1;
- duplicateMovieClip(_root.explosion,"explosion" + _root.explosioncount,16384 + _root.explosioncount);
- setProperty("_root.explosion" + _root.explosioncount, _X, _root.ship._x);
- setProperty("_root.explosion" + _root.explosioncount, _Y, _root.ship._y);
- if(_root.explosioncount >= 4070)
- {
- _root.explosioncount = 4050;
- }
- _root.shipcount--;
- _root.displaycount = 0;
- removeMovieClip("_root.es" + this._name);
- _root.dragger._y = -150;
- _root.ship._y = -150;
- removeMovieClip(this);
- }
- i = 2000;
- while(2010 >= i)
- {
- if(hitTest("_root." + i))
- {
- removeMovieClip("_root." + i);
- killthis = 1;
- addhit++;
- }
- i++;
- }
- if(allowfire == 0 && killthis == 1)
- {
- killthis = 0;
- _root.explosioncount = _root.explosioncount + 1;
- duplicateMovieClip(_root.explosion,"explosion" + _root.explosioncount,16384 + _root.explosioncount);
- setProperty("_root.explosion" + _root.explosioncount, _X, _X);
- setProperty("_root.explosion" + _root.explosioncount, _Y, _Y);
- if(_root.explosioncount >= 4070)
- {
- _root.explosioncount = 4050;
- }
- if(deathlevel == 0)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- allowfire = 1;
- _root.score += 20;
- }
- if(deathlevel == 1)
- {
- if(addhit >= 3)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- _root.score += 40;
- }
- }
- if(deathlevel == 2)
- {
- if(addhit >= 6)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- _root.score += 80;
- }
- }
- if(deathlevel == 3)
- {
- if(addhit >= 8)
- {
- removeMovieClip("_root.es" + this._name);
- removeMovieClip(this);
- _root.score += 100;
- }
- }
- }
- }
- }
-